using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Dal.Entities;

namespace Dal.Mapping
{
	public class Doc4Map : EntityTypeConfiguration<Doc4>
	{
		public Doc4Map()
		{
			// Primary Key
			this.HasKey(t => t.DocID);

			// Properties
			this.Property(t => t.DocID)
				.HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
				
			this.Property(t => t.TreatmentCase)
				.HasMaxLength(50);
				
			this.Property(t => t.SafeFrequency)
				.HasMaxLength(150);
				
			this.Property(t => t.SafeTestAddYiDao)
				.HasMaxLength(50);
				
			this.Property(t => t.DinnerTime)
				.HasMaxLength(10);
				
			this.Property(t => t.AdditionSafeFrequenceTimesPeerWeek)
				.HasMaxLength(50);
				
			// Table & Column Mappings
			this.ToTable("Doc4");
			this.Property(t => t.DocID).HasColumnName("DocID");
			this.Property(t => t.TreatmentCase).HasColumnName("TreatmentCase");
			this.Property(t => t.EffectReduceBloodSugar).HasColumnName("EffectReduceBloodSugar");
			this.Property(t => t.EffectSpeed).HasColumnName("EffectSpeed");
			this.Property(t => t.SafeFrequency).HasColumnName("SafeFrequency");
			this.Property(t => t.SafeTestAddYiDao).HasColumnName("SafeTestAddYiDao");
			this.Property(t => t.DinnerTime).HasColumnName("DinnerTime");
			this.Property(t => t.CaseDescription).HasColumnName("CaseDescription");
			this.Property(t => t.AdditionSafeFrequenceTimesPeerWeek).HasColumnName("AdditionSafeFrequenceTimesPeerWeek");
			this.Property(t => t.StatusAudit).HasColumnName("StatusAudit");
			this.Property(t => t.StatusComplete).HasColumnName("StatusComplete");
		}
	}
}

